import request from '@/router/axios';

/*
 * 查询部门列表
 * */
export function getDepartmentList(query) {
    return request({
        url: '/cp/workdepartment/index',
        method: 'get',
        params: query
    });
}

/*
 * 查询部门列表2
 * */
export function getDepartmentList2(query) {
    return request({
        url: '/cp/workdepartment/index-new',
        method: 'get',
        params: query
    });
}

/*
 * 部门管理初始加载查询
 * */
export function departmentManage(query) {
    return request({
        url: '/cp/workdepartment/pageindex',
        method: 'get',
        params: query
    });
}

/*
 * 根据手机号匹配成员部门下拉列表
 * */
export function selectByPhone(query) {
    return request({
        url: '/cp/workdepartment/selectbyphone',
        method: 'get',
        params: query
    });
}

/*
 * 查看人员列表
 * */
export function memberList(query) {
    return request({
        url: '/cp/workdepartment/showemployee',
        method: 'get',
        params: query
    });
}

/*
 * 部门下的成员列表
 * */
export function memberByDepartmentList(query) {
    return request({
        url: '/cp/workdepartment/workemployeedepartment/memberindex',
        method: 'get',
        params: query
    });
}

/*
 * 部门下的成员列表（数据订阅）
 * */
export function memberByDepartmentList2(deptId) {
    return request({
        url: `/admin/user/list/${deptId}`,
        method: 'get'
    });
}
